"""project_1 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from .views import viewsIndex,viewsGoods,viewsCart,viewsOrder
urlpatterns = [

    # 登录
    url(r'^login/$', viewsIndex.login,name="myhome_login"),
    # 注册
    url(r'^register/$', viewsIndex.register,name="myhome_register"),
    # ajax判断用户名存不存在与数据库
    url(r'^ajaxUser/$', viewsIndex.ajaxUser,name="myhome_ajaxUser"),
    # 商品列表
    url(r'^goodslist/$', viewsGoods.goodslist,name="myhome_goods_list"),
    # 商品详情
    url(r"^goodsInfo/$", viewsGoods.goodsInfo, name="myhome_goods_info"),
    # 添加到购物车函数
    url(r"^cart/$", viewsGoods.carts, name="myhome_cart"),
    # 购物车主页
    url(r"^indexcart/$", viewsCart.index, name="myhome_cart_index"),
    # 购物车主页
    url(r"^cartMoney/$", viewsCart.money, name="myhome_cart_money"),
    # 提交订单
    url(r"^cartsubmit/$", viewsCart.submit, name="myhome_cart_submit"),
    # 删除商品
    url(r"^cartdel/$",viewsCart.delete, name="myhome_cart_del"),
    # 城市联动
    url(r"^citys/$",viewsOrder.citys, name="myhome_citys"),
    # 订单主页
    url(r"^orderindex/$",viewsOrder.index, name="myhome_order_order"),
    # 个人信息
    url(r"^ordermanage/$",viewsOrder.manage, name="myhome_order_manage"),
    # 修改个人信息
    url(r"^infoupdate/$",viewsOrder.infoUpdate, name="myhome_info_update"),
    # 收货地址编辑
    url(r"^orderaddr/$",viewsOrder.addrIndex, name="myhome_order_addrIndex"),
    # 收货地址提交
    url(r"^addrsubmit/$",viewsOrder.address, name="myhome_address"),
    # 购买
    url(r"^placeorder/$",viewsOrder.place_order, name="myhome_place_order"),
    # 购买成功
    url(r"^over$",viewsOrder.over, name="myhome_over"),
    # 删除订单
    url(r"^orderdel", viewsOrder.orderDel ,name="myhome_order_del"),
    # 付款订单
    url(r"^orderfu", viewsOrder.orderfu ,name="myhome_order_fu"),
    # 测试验证码页面
    url(r"^yanzhengma/$", viewsIndex.yanzhengma, name="myhome_yanzhengma"),
    # 获取验证码
    url(r"^sendmsg/$", viewsIndex.sendmsg, name="myhome_sendmsg"),
    # 退出登录
    url(r"^logout/$", viewsIndex.logout, name="myhome_logout"),
    # 主页
    url(r'^$', viewsIndex.index,name="myhome_index"),
]
